package ${domain}.module.wsys.req;

import org.hibernate.validator.constraints.Length;
import ${domain}.frame.base.BaseUpdateRequest;
import ${domain}.frame.validation.Select;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * ProfilesUpdateRequest - 系统配置更新
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2020-07-06
 */
public class ProfilesUpdateRequest extends BaseUpdateRequest {

    /**
     * 主键.
     */
    @NotNull(message = "[id]主键不能为NULL")
    private Long id;

    /**
     * 配置环境.
     * dev:开发环境
     * prod:生产环境
     */
    @NotNull(message = "[active]配置环境不能为NULL")
    @Select({"dev", "prod"})
    private String active;

    /**
     * 配置项名.
     */
    @NotBlank(message = "[key]配置项名不能为空")
    @Length(min = 0, max = 50, message = "[key]配置项名长度不合法(0-50)")
    private String key;

    /**
     * 配置项值.
     */
    @NotBlank(message = "[value]配置项值不能为空")
    @Length(min = 0, max = 50, message = "[value]配置项值长度不合法(0-50)")
    private String value;

    /**
     * 配置描述.
     */
    @Length(min = 0, max = 255, message = "[note]配置描述长度不合法(0-255)")
    private String note;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getActive() {
        return this.active;
    }

    public void setActive(String active) {
        this.active = active;
    }

    public String getKey() {
        return this.key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getNote() {
        return this.note;
    }

    public void setNote(String note) {
        this.note = note;
    }
}
